luci-mod-network: diagnostics: add realtime command output
authorRichard Yu <[email protected]>
Mon, 1 Sep 2025 14:43:16 +0000 (22:43 +0800)
committerPaul Donald <[email protected]>
Fri, 12 Dec 2025 15:40:04 +0000 (16:40 +0100)
commit122a5ba73e50bfc6c474fcee0d352aa7fab9f05d
tree3df8cf7036e5ac0fc365295c1aacd5c729c48bf5
parentece28ab5a4d476c73d404fbbb6d3b919832fea13
luci-mod-network: diagnostics: add realtime command output

The diagnostics page is using `fs.exec()` to execute command, which blocks
until command exit. Users have to wait for a while to see the result.

When doing IPv6 traceroute, this may cause XHR timeout, if target host
is unreachable. (See issue #7210)

This commit uses new `responseProgress` callback and `stderr` option
added in luci.js and fs.js to update command output.

Signed-off-by: Richard Yu <[email protected]>
Link: https://github.com/openwrt/luci/pull/7920
modules/luci-mod-network/htdocs/luci-static/resources/view/network/diagnostics.js